@extends('base')
@section('content')
    <div class="pro_banner">
        <img src="{{asset('/image/probanner.jpg')}}"/>
    </div>
    <div class="bg_wh overflow">
        <div class="main_about">
            <ul class="details_menu">
                <li><a href="#">全部</a></li>
                <span class="fl">></span>
                <li><a href="#">首页</a></li>
                <span class="fl">></span>
                <li><a href="#">关于我们</a></li>
            </ul>
            <div class="main_L">
                <div class="side_nav">
                    <a href="{{url('/cooperation')}}">
                        <div class="i_1">招商计划</div>
                    </a>
                    <a href="{{url('/cooperation/intention')}}">
                        <div class="i_4">合作模式</div>
                    </a>
                    <a href="{{url('/cooperation/model')}}" class="current">
                        <div class="i_4">合作意向</div>
                    </a>
                </div>
            </div>
            <div class="main_R">
                <div class="con partner_1">
                    <article class="partner" style="border-bottom: 1px dashed #CCCCCC; padding-bottom: 20px;">
                        <p><strong>合作意向</strong></p>
                        <p><span>&nbsp; ●  加盟电话：{{ Config::get('site.about.mobile') }}</span></p>
                        <p><span>&nbsp; ●  邮箱：{{ Config::get('site.about.email') }}</span></p>
                        <p><span>&nbsp; ●  地址：{{ Config::get('site.about.addr') }}</span></p>
                    </article>
                    <form id="sendFrom" action="{{url('/info/update/intention')}}">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <table>
                            <tbody>
                            <tr>
                                <td align="right">您的姓名：</td>
                                <td><input type="text" id="name" name="name" class="text" validate="required:true"
                                           data-msg-required="请填写您的姓名。"></td>
                            </tr>
                            <tr>
                                <td align="right" valign="top"><span>*</span>合作意向：</td>
                                <td><textarea name="intention" id="intention" validate="required:true"
                                              data-msg-required="请填写合作意向。"></textarea></td>
                            </tr>
                            <tr>
                                <td align="right"><span>*</span>您的邮箱：</td>
                                <td><input type="text" name="email" id="email" class="text"
                                           validate="required:true,email:true" data-msg-required="请填写您的邮箱。"></td>
                            </tr>
                            <tr>
                                <td align="right"><span>*</span>手机号码：</td>
                                <td><input type="text" name="mobile" id="mobile" class="text"
                                           validate="required:true,mobile:true" data-msg-required="请填写手机号码。"></td>
                            </tr>
                            <tr>
                                <td align="right">联系电话：</td>
                                <td><input type="text" name="tel" id="tel" class="text" validate="required:true"
                                           data-msg-required="请填写联系电话。"></td>
                            </tr>
                            <tr>
                                <td align="right">公司名称：</td>
                                <td><input type="text" name="company" id="company" class="text" validate="required:true"
                                           data-msg-required="请填写公司名称。"></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input type="button" class="btn" id="sendButton" value="提交"></td>
                            </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="bg_f6f7 overflow">
        <ul class="index_major">
            <li>专业<span>我们只做手机开门</span></li>
            <li class="borderlfdadc">安全<span>电子钥匙不可复制开门记录可查</span></li>
            <li class="borderlfdadc">无限制<span>APP用户数量不受限制成本低</span></li>
            <li class="borderlfdadc">免费<span>APP专属页面免费定制</span></li>
            <li class="borderlfdadc">开放<span>API接口开放提供技术支持</span></li>
        </ul>
    </div>
@stop
@section('js')
    <script>
        $(function () {
            $('#sendButton').on('click', function () {
                $.ajax({
                    cache: true,
                    type: "POST",
                    url: $('#sendFrom').attr('action'),
                    data: $('#sendFrom').serialize(),// 你的formid
                    async: false,
                    error: function (request) {
                        alert("Connection error");
                    },
                    success: function (data) {
                        console.log(data);
                        alert(data.message);
                        if ("success" == data.state) {
                            $('#sendFrom').reset();
                        }
                    }
                });
            })
        })
    </script>
@stop